﻿using System;
using System.Collections.Generic;
using JetBrains.Annotations;
#if NETFX_CORE
using Windows.UI.Xaml.Navigation;
#else
using System.Windows.Navigation;
#endif

namespace MugenMvvmToolkit.Interfaces
{
    /// <summary>
    ///     Represents the navigation context.
    /// </summary>
    public interface INavigationContext
    {
        /// <summary>
        ///     Gets the page mapping, if any.
        /// </summary>
        IViewPageMappingItem PageMapping { get; }

        /// <summary>
        ///     Gets the uri, if any.
        /// </summary>
        Uri Uri { get; }

#if !NETFX_CORE
        /// <summary>
        ///     Gets the parameters, if any.
        /// </summary>
        IDictionary<string, string> Parameters { get; }
#endif
#if WPF || NETFX_CORE
        /// <summary>
        /// A <see cref="T:System.Object"/> that contains data to be used for processing during navigation.
        /// </summary>
        object Parameter { get; }
#endif

        /// <summary>
        ///     Gets the value that indicates that view-model was created using the navigation system.
        /// </summary>
        bool IsAutoCreatedViewModel { get; }

        /// <summary>
        ///     Gets the navigation provider that creates this context.
        /// </summary>
        [NotNull]
        INavigationProvider NavigationProvider { get; }

        /// <summary>
        /// Gets the value of the mode parameter from the originating Navigate call.
        /// </summary>
        NavigationMode? NavigationMode { get; }
    }
}